package com.design.singleton;

/**
 * @Author: ChengLei.Liu
 * @Date: 2020-06-05 13:22
 * @Description: 单例模式(饿汉式)
 * 通过静态代码块实现
 */
public class Singleton02 {

    private static Singleton02 instance;

    static {
        instance = new Singleton02();
    }

    private Singleton02(){

    }

    public static Singleton02 getInstance(){
        return instance;
    }
}
